<script lang='ts' setup name='Child'>  
 import { inject, ref } from 'vue' 



 const user =  inject("user",{name:'',age:0})
 const person =  inject("person",{name:'',age:0})


   function changeUser(){
        user.name = 'sdsfasfasfasfas'
   }

</script>  
  
<template>  
   <div style="border: solid 1px red; background-color: skyblue;margin: 20px;padding: 30px;">
    
     用户信息:{{ user }}

     <button @click="changeUser()">修改用户信息</button>
     

     <hr>
    Person 信息:{{ person }}


   </div>




</template>  
  
<style scoped>  

</style>  